-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump sinon to ^15.2.0 #37430
Bump sinon to ^15.2.0 #37430
Conversation
Netlify deploy previewhttps://deploy-preview-37430--material-ui.netlify.app/ Bundle size report |
The failing test is this |
Update: The issue is coming from cc: @mui/core looking at the change I'm suspicious about, does something catch your attention as the reason why it broke the Tooltip test? |
I couldn't find a clear explanation or solution for the issue. However, based on my investigation, I observed that the test passes when run on the browser environment, but fails when run on JSDom, which is a testing environment that simulates Node.js. Also I see the stack trace pointing to the following lines in Node.js timers module:
They added mocks to the Since the same problem is also blocking a pull request in the MUI X repository (mui/mui-x#9063), it might be worth opening an issue in the fake-timers repository (https://github.com/sinonjs/fake-timers/issues) to seek further assistance and resolution for this issue. |
Sinon maintainer here. Since you are not using fake timers directly I followed the rendering utils suspects in In https://github.com/mui/material-ui/blob/master/test/utils/createRenderer.tsx#L18 the fake timers are setup, nothing scary that I can see. I am guessing this is basically a case of JSOM's timers and Node's timers fighting it out ( Figuring out exactly which line needs to be changed, if it is the setup (changing the target for the stubbing from the implicit global to We did not expect this to break uses of I don't have the possibility to debug the details right now, but could you try to pinpoint which sets of timers ( |
852d1fd
to
91a2be6
Compare
This should pass if changing to use Sinon 15.1.2 (which targets the older version). Still, would like to know if the above section could point out what is wrong. While I could reproduce locally by running
No idea why. Used
|
91a2be6
to
7b0d2d7
Compare
@fatso83 thanks for taking a look into it! I think updating to sinon I tried all the variations of To run the test locally, you can use describe('prop: followCursor', () => {
it.only('should use the position of the mouse', async function test() {
// ... |
Hopefully re-releasing 10.1.0 as 10.3.0 will fix this for you guys. I have no idea why the changes did not work for you guys, though, but this will probably give you some more time. https://www.npmjs.com/package/@sinonjs/fake-timers?activeTab=versions |
7b0d2d7
to
89997bd
Compare
The new failure is related to Webpack 5 adjustments we just merged in Sinon 15.2. You probably need to change your polyfills setup. Similar: microsoft/PowerBI-visuals-tools#365 |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠ Warning: custom changes will be lost. |
Hey @michaldudak, may I ask for your review here? required a slight change in the regression's test webpack config: https://github.com/mui/material-ui/pull/37430/files#diff-c6283f5fa0c0e1715f4d0fdac062964728ebcd04b2868febd6efa5b1b4017600R28 |
All seems to be good with regression tests - good job! |
Thanks @fatso83 for taking a look into it and helping us update! 🚀 |
No worries, glad to help. that still leaves the mystery of what originally breaks your tests. As soon as we release Sinon 16 with fake-timers 11 this will resurface. Hopefully someone is able to create a trimmed-down minimal testcase by then. |
This PR contains the following updates:
^15.0.4
->^15.2.0
Release Notes
sinonjs/sinon
v15.2.0
Compare Source
66b0081e
Use fake-timers v10.1.0 re-released as v10.3.0 (Carl-Erik Kopseng)
a79ccaeb
Support callable instances (#2517) (bojavou)
d220c995
fix: bundling compatibility with webpack@5 (#2519) (Avi Vahl)
Released by Carl-Erik Kopseng on 2023-06-20.
v15.1.2
Compare Source
02b73aed
Update lock file after removing node_modules ... (Carl-Erik Kopseng)
Released by Carl-Erik Kopseng on 2023-06-12.
v15.1.1
Compare Source
194fc2ef
Change fake-timers version to specifically target the one containing the 'jump' feature (Carl-Erik Kopseng)
05f05ac3
docs: Remove threw(obj) from docs (#2513) (Morgan Roderick)
Released by Carl-Erik Kopseng on 2023-06-12.
v15.1.0
Compare Source
79e719f2
Ensure we use a fake-timers version with clock.jump (Carl-Erik Kopseng)
b2a4df5a
Add docs for clock.jump method (#2512) (Jason O'Neill)
f096abff
fix (#2514): only force new or inherited descriptors to be configurable (#2515) (Carl-Erik Kopseng)
Released by Carl-Erik Kopseng on 2023-05-18.
Configuration
📅 Schedule: Branch creation - "on sunday before 6:00am" in timezone UTC, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.